﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotSpatial.Topology;

namespace HAGISV2
{
    /// <summary>
    /// Scatter2D图层操作传递参数
    /// </summary>
    public class Scatter2DPointOperationEventArgs:EventArgs
    {
        /// <summary>
        /// 编辑时使用
        /// </summary>
        /// <param name="layerId"></param>
        /// <param name="shpId"></param>
        /// <param name="mode"></param>
        /// <param name="values"></param>
        /// <param name="coord"></param>
        public Scatter2DPointOperationEventArgs(string layerId, string shpId, List<double> values, Coordinate coord)
        {
            this._layerId = layerId;
            this._idForEdit = shpId;
            this._operationMode = MFBasicOperationMode.Edit;
            this._values = values;
            this._coord = coord;
        }

        /// <summary>
        /// 删除时使用
        /// </summary>
        /// <param name="layerId"></param>
        /// <param name="ids"></param>
        public Scatter2DPointOperationEventArgs(string layerId, List<string> ids)
        {
            this._layerId = layerId;
            this._operationMode = MFBasicOperationMode.Delete;
            if (ids == null)
                _idsForDelete = new List<string>();
            else
                this._idsForDelete = ids;
        }

        /// <summary>
        /// 添加时使用
        /// </summary>
        /// <param name="coord"></param>
        public Scatter2DPointOperationEventArgs(string layerId, Coordinate coord,List<double> values)
        {
            this._layerId = layerId;
            this._coord = coord;
            this._values = values;
            this._operationMode = MFBasicOperationMode.Add;
        }

        string _layerId;
        /// <summary>
        /// 进行操作的图层Id
        /// </summary>
        public string LayerId
        {
            get { return _layerId; }
            set { _layerId = value; }
        }

        Coordinate _coord;
        /// <summary>
        /// 添加编辑时使用
        /// </summary>
        public Coordinate Coord
        {
            get { return _coord; }
            set { _coord = value; }
        }

        List<string> _idsForDelete;
        /// <summary>
        /// 删除时使用
        /// </summary>
        public List<string> IdsForDelete
        {
            get { return _idsForDelete; }
            set { _idsForDelete = value; }
        }

        string _idForEdit;
        /// <summary>
        /// 编辑时使用
        /// </summary>
        public string IdForEdit
        {
            get { return _idForEdit; }
            set { _idForEdit = value; }
        }

        List<double> _values;
        /// <summary>
        /// 值
        /// </summary>
        public List<double> Values
        {
            get { return _values; }
            set { _values = value; }
        }


        MFBasicOperationMode _operationMode;
        /// <summary>
        /// 操作模式
        /// </summary>
        public MFBasicOperationMode OperationMode
        {
            get { return _operationMode; }
            set { _operationMode = value; }
        }

    }

    
}
